<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="com.daogou.model.TBItems"%>
<%@ page import="com.inter.Taobao"%>
<%@ page import="com.inter.Taobao"%>
<%@ page import="com.taobao.api.ApiException"%>
<%@ page import="com.taobao.api.domain.TaobaokeItem"%>
<%@ page import="java.util.List"%>
<%
    List<TaobaokeItem> re = (List<TaobaokeItem>)request.getAttribute("result");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>搜索到---<%= request.getAttribute("pages")%>页数据</title>
</head>
<body>
   <table>
     <tr><th>商品名称</th><th>商品图片</th><th>商品返利</th><th>购买地址</th></tr>
      <%
      for(TaobaokeItem item:re){
          out.print("<tr> <td>");
          out.print(item.getTitle());
          out.print("</td><td>");
          out.print("<img src=\""+item.getPicUrl()+"_120x120.jpg\">");
          out.print("</td><td>");
          out.print(item.getPrice()+"元/返回"+item.getCommission());
          out.print("</td><td>");
          out.print("<a href=\""+item.getClickUrl()+"\" target=\"_blank\">点击购买</a>");
          out.print("</td> </tr>");
      }
     %>
     
   </table>
   
</body>
</html>